import request from '@/utils/request'

//分页
export function getDepartmentList(params) {
  return request({
    url: '/base/department/listPage',
    method: 'get',
    params
  })
}


// 更新系所
export function updateDepartment(params) {
  return request({
    url: '/base/department/updateById',
    method: 'put',
    data: params
  })
}

// 批量删除 逗号隔开的id字符串
export function bathDeleteDepartment(ids) {
  return request({
    url: `/base/department/deleteByIds/${ids}`,
    method: 'delete'
  })
}
// 新增系所
export function addDepartment(data) {
  return request({
    url: `/base/department/add`,
    method: 'put',
    data
  })
}
// 系所代码
export function getDepartmentCode(collegeCode) {
  return request({
    url: `/base/department/getDeptCode?collegeCode=${collegeCode}`,
    method: 'get',
  })
}
